package com.edoomath.api.servcice;

import java.util.List;
import java.util.Map;

import com.edoomath.entity.course.Course;
import com.edoomath.entity.user.User;
import com.edoomath.entity.usercourse.UserCourse;
import com.edoomath.entity.usercourse.UserCourseAttribute;
import com.edoomath.entity.usercourse.UserCourseItem;
import com.edoomath.entity.usercourse.UserCourseStat;
import com.edoomath.entity.usercourse.UserCourseTask;

/**
 * 
 * @author mohanlan
 *
 */
public interface UserCourseService extends DataService<UserCourse> {
	
	/**
	 * 
	 * @param unionid
	 * @param courseId
	 * @return
	 */
	public UserCourse loadUserCourse(String unionid, Long courseId);
	
	/**
	 * 
	 * @param userCourse
	 * @return
	 */
	public UserCourseStat loadStat(UserCourse userCourse);
	
	/**
	 * 
	 * @param unionid
	 * @return
	 */
	public List<UserCourse> listUserCourse(String unionid);
	
	/**
	 * 
	 * @param user
	 * @param course
	 * @return
	 */
	public UserCourse create(User user, Course course, String opengid);
	
	/**
	 * 
	 * @param user
	 * @param course
	 * @return
	 */
	public List<UserCourseItem> listUserCourseItem(UserCourse userCourse);
	
	/**
	 * 
	 * @param userCourses
	 * @return
	 */
	public Map<String, Map<String, UserCourseAttribute>> listUserCourseAttrs(List<UserCourse> userCourses);
	
	/**
	 * 
	 * @param userCourse
	 * @return
	 */
	public List<UserCourseAttribute> listUserCourseAttribute(UserCourse userCourse);
	
	/**
	 * 
	 * @param unionid
	 * @return
	 */
	public List<UserCourseStat> listUserCourseStat(String unionid);
	
	/**
	 * 
	 * @param userCourse
	 * @return
	 */
	public Map<String, List<UserCourseTask>> listUserCourseTasks(UserCourse userCourse);
	
}
